//
//  PRSystem.h
//  CandyJump
//
//  Created by Bon Lam on 05/03/2011.
//  Copyright 2011 Peru Republic. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <sys/sysctl.h>
#import <sys/types.h>

//=====================================================================================================================
@interface UIDevice(machine)
- (NSString *)machine;
@end

#pragma mark -

//typedef enum  {
//	PRDEVICE_UNKNOWN = 0,
//	PRDEVICE_IPHONE,
//	PRDEVICE_IPHONE_3G,
//	PRDEVICE_IPHONE_3GS,
//	PRDEVICE_IPHONE_4,
//	PSDEVICE_IPOD,
//	PSDEVICE_IPOD_2G,
//	PSDEVICE_IPOD_2G2,
//	PSDEVICE_IPOD_3G,
//	PSDEVICE_IPOD_4G,
//	PSDEVICE_IPAD,
//	PSDEVICE_IPAD2,
//} PRDEVICE_TYPE;

//=====================================================================================================================
#define	PRDEVICE_TYPE_MASK						0xf0
#define PRDEVICE_TYPE_IPOD						(1<<4)
#define PRDEVICE_TYPE_IPHONE					(1<<5)
#define PRDEVICE_TYPE_IPAD						(1<<6)

#define	PRDEVICE_UNKNOWN						0
#define	PRDEVICE_IPHONE							(PRDEVICE_TYPE_IPHONE | 1)
#define	PRDEVICE_IPHONE_3G						(PRDEVICE_TYPE_IPHONE | 2)
#define	PRDEVICE_IPHONE_3GS						(PRDEVICE_TYPE_IPHONE | 3)
#define	PRDEVICE_IPHONE_4						(PRDEVICE_TYPE_IPHONE | 4)
#define	PRDEVICE_IPOD							(PRDEVICE_TYPE_IPOD | 1)
#define	PRDEVICE_IPOD_2G						(PRDEVICE_TYPE_IPOD | 2)
#define	PRDEVICE_IPOD_2G2						(PRDEVICE_TYPE_IPOD | 3)
#define	PRDEVICE_IPOD_3G						(PRDEVICE_TYPE_IPOD | 4)
#define	PRDEVICE_IPOD_4G						(PRDEVICE_TYPE_IPOD | 5)
#define	PRDEVICE_IPAD							(PRDEVICE_TYPE_IPAD | 1)
#define	PRDEVICE_IPAD2							(PRDEVICE_TYPE_IPAD | 2)


//=====================================================================================================================
@interface PRDevice : NSObject {

}

//---------------------------------------------------------------------------------------------------------------------
#pragma mark Model Info.
+ (Byte)getDeviceModel;
+ (Byte)getDeviceType;
+ (BOOL)isiPad;
+ (BOOL)isHD;
+ (BOOL)isRetinaDisplay;

#pragma mark Basic Info.
+ (NSString *)getUDID;
+ (NSString *)getDeviceName;
+ (NSString *)getSystemName;
+ (NSString *)getSystemVersion;
+ (NSString *)getDeviceModelName;
+ (NSString *)getSystemLanguage;
+ (NSString *)getDeviceLanguage;

#pragma mark Cocoa Framework
+ (BOOL)isGameCenterAvailable;

@end
